package com.syt.hospital.repository;

import com.syt.model.hospital.Department;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

/**
 * @Author: xxx
 * @Date: 2023/2/12 17:25
 * @Description: 科室
 */
@Repository
public interface DepartmentRepository extends MongoRepository<Department,String> {

    /**
     * 设置科室名称
     * @param hoscode
     * @param depcode
     * @return
     */
    Department findDepartmentByHoscodeAndDepcode(String hoscode, String depcode);

    /**
     * 部门分页查询
     * @param example
     * @param pageable
     * @return
     */
    //Page<Department> findAll(Example<Object> example, PageRequest pageable);
    /**
     * 根据医院编号和科室编号查询
     * @param hoscode
     * @param depcode
     * @return
     */
    Department getDepartmentByHoscodeAndDepcode(String hoscode, String depcode);


}
